package com.joe.springcloud.controller;

import com.joe.springcloud.entities.CommonResult;
import com.joe.springcloud.service.PaymentFeginService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: Joe
 * @Date: 2020/10/26 0026 下午 3:52
 */
@RestController
@Slf4j
public class OrderFeignController {
    @Resource
    private PaymentFeginService paymentFeginService;

    @GetMapping("/consumer/payment/get/{id}")
    public CommonResult getPaymentById(@PathVariable("id")Long id){
        return paymentFeginService.getPaymentById(id);
    }

    @GetMapping("/consumer/payment/feign/timeout")
    public String paymentFeignTimeout(){
        return paymentFeginService.paymentFeignTimeout();
    }

}
